package com.yidu.best.systemManagement.systemLog.controller;


import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
/**
 * 
 * @author AA
 *
 */
import org.springframework.web.bind.annotation.ResponseBody;

import com.yidu.best.systemManagement.systemLog.domian.Log;
import com.yidu.best.systemManagement.systemLog.domian.LogVo;
import com.yidu.best.systemManagement.systemLog.service.LogService;
@Controller
@RequestMapping("/sys/")
public class LogController {
	@Autowired
	public LogService logService;
	
	/**
	 * 跳转页面到exchangeList
	 * @return
	 */
	@RequestMapping(value = "getLog",method = RequestMethod.GET)
	public String jumpLog() {
		return "sys/Log/Log";
	}
	
	
	/**
	 * 分页查询
	 * @param exchangeVo
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "log",method = RequestMethod.GET)
	public  Map<String,Object> selectLog(LogVo logVo){
		Map<String,Object> map = new HashMap<String, Object>();
		map = logService.findPageQueryLog(logVo);
		return map ;
	}
	
	public void addLog(Log log) {
		logService.addLog(log);
	}
	
	
	
	
	
}